A Bar chart with long labels
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.bar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
window.onload = function ()
{
var data = [[4,5,3],[4,8,6],[4,2,4],[4,2,3],[1,2,3],[8,8,4],[4,8,6]];
var bar = new RGraph.Bar({
id: 'cvs',
data: data,
options: {
labels: [
'Mondays sales statistics',
'Tuesdays sales statistics',
'Wednesdays sales statistics',
'Thursdays sales statistics',
'Fridays sales statistics',
'Saturdays sales statistics',
'Sundays sales statistics'
],
labelsOffsety: 8,
colors: ['red','yellow', 'pink'],
grouping: 'stacked',
gutterLeft: 100,
gutterTop: 5,
gutterBottom: 150,
gutterRight: 5,
textAngle: 45,
textAccessible: false,
strokestyle: 'rgba(0,0,0,0)'
}
}).draw();
};
</script>